package org.zfes.snowier.cloud.zbss.pmp.dao;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.zfes.snowier.common.dao.mybatis.BaseMapper;
import org.zfes.snowier.common.dao.params.ParamMap;
import org.zfes.snowier.cloud.zbss.pmp.model.PmpTasks;
import org.zfes.snowier.core.data.Record;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface PmpTasksMapper extends BaseMapper<PmpTasks>{
	
	Long selectListCount(ParamMap params);
	
	List<Record> selectMapListPage(ParamMap params);
	
	List<PmpTasks> selectModelListPage(ParamMap params);
	
	List<PmpTasks> selecTasksByChargeUserId(@Param("chargeUserId")Long chargeUserId);
	List<PmpTasks> selecTasksByProjectId(@Param("projectId")Long projectId);
	
	int updateStatus(@Param("id")Long id, @Param("status")Byte status);

	int updateAssignHours(@Param("id")Long id, @Param("assignHours")Integer assignHours);
	
	int updateTaskName(@Param("id")Long id, @Param("taskName")String taskName);
	
	int updateExpiryTime(@Param("id")Long id, @Param("expiryTime")Date expiryTime);
	
	
	
	int updateExpired(@Param("id")Long id, @Param("expired")Byte expired);
	
	int updateVersion(@Param("id")Long id, @Param("versionId")Long versionId,@Param("versionName")String versionName);
	
	int updateDifficultyScore(@Param("id")Long id, @Param("difficultyScoreId")Long difficultyScoreId,@Param("difficultyScore")Integer integer,@Param("difficultyScoreName")String difficultyScoreName);
	
	int updateProgress(@Param("id")Long id,@Param("progress")Byte progress);
	int updateWorkHours(@Param("id")Long id, @Param("workHours")Integer workHours);
	int updateProgressAndWorkHours(@Param("id")Long id,@Param("progress")Byte progress,@Param("workHours")Integer workHours);

	int updatePriority(@Param("id")Long id, @Param("priority")Byte priority);

	int updateChargeUser(@Param("id")Long id, @Param("chargeUserId")Long chargeUserId, @Param("chargeUserName")String chargeUserName, @Param("status")Byte status);

	int updateCheck(@Param("id")Long id,  @Param("status")Byte status, @Param("rejectResaon")String rejectResaon);
	
}
